package com.vvlive.caibao.smartcity.utils;

import com.vvlive.caibao.smartcity.bean.IndexFuncationListBean;
import com.vvlive.caibao.smartcity.ui.ActivityGoRegister;
import com.vvlive.caibao.smartcity.ui.Activity_LeaveForTime;
import com.vvlive.caibao.smartcity.ui.AddActivity;
import com.vvlive.caibao.smartcity.ui.AirConditioningControlActivity;
import com.vvlive.caibao.smartcity.ui.BusinessTripApplyActivity;
import com.vvlive.caibao.smartcity.ui.CallForHelpActivity;
import com.vvlive.caibao.smartcity.ui.CastScreenActivity;
import com.vvlive.caibao.smartcity.ui.CheckOnActivity;
import com.vvlive.caibao.smartcity.ui.CustomersContactsActivity;
import com.vvlive.caibao.smartcity.ui.FilesInputActivity;
import com.vvlive.caibao.smartcity.ui.LifeEatOutListActivity;
import com.vvlive.caibao.smartcity.ui.LightingControlActivity;
import com.vvlive.caibao.smartcity.ui.MeetingProcessActivity;
import com.vvlive.caibao.smartcity.ui.OrderOneMeetingActivity;
import com.vvlive.caibao.smartcity.ui.PhoneReflectActivity;
import com.vvlive.caibao.smartcity.ui.QRCodeActivity;
import com.vvlive.caibao.smartcity.ui.TemporaryVisitCustomer;
import com.vvlive.caibao.smartcity.ui.VoteActivity;
import com.vvlive.caibao.smartcity.ui.WorkOvertimeApplyActivity;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import smartcity.vvlive.caibao.com.smartc.R;


/**
 * Created by lenovo on 2015/6/30.
 * 首页功能列表信息包
 */
public class FuncationInitUtils {
    //图标
    private int[] icn = new int[]{R.mipmap.overtime_icn,
            R.mipmap.evection_icn,
            R.mipmap.go_out_icn,
            R.mipmap.vacate_icn,
            R.mipmap.attendance_icn,
            R.mipmap.enterprise_micro_letter_icn,
            R.mipmap.visit_icn,
            R.mipmap.zm_door_icn,
            R.mipmap.history_icn,
            R.mipmap.customer_label_icn,
            R.mipmap.contact_clients_icn,
            R.mipmap.air_condition_icn,
            R.mipmap.light_control_icn,
            R.mipmap.file_icn,
            R.mipmap.cast_screen_icn,
            R.mipmap.call_for_help_icn,
            R.mipmap.phone_reflect_icn,
            R.mipmap.vote_icn,
            R.mipmap.order_icn,
            R.mipmap.meeting_process_icn,
            R.mipmap.qr_code,
            R.mipmap.add_icn};
    //名称
    private int[] text = new int[]{
            R.string.overtime,
            R.string.evection,
            R.string.go_out,
            R.string.vacate,
            R.string.attendance,
            R.string.order_eat,
            R.string.visit,
            R.string.zm_door,
            R.string.history,
            R.string.customer_label,
            R.string.contact_clients,
            R.string.air_condition,
            R.string.light_control,
            R.string.func_meeting_files,
            R.string.func_cast_screen,
            R.string.func_call_for_help,
            R.string.func_phone_reflect,
            R.string.func_vote,
            R.string.func_order_meeting,
            R.string.func_meeting_process,
            R.string.func_qr_card,
            R.string.add
    };
    /**
     * 将首页功能类的activity添加到Arrays.asList(xx.class,xx.class)
     * 保持AddActivity.class始终在末尾
     * 注意位置和昵称对应
     */
    public List<Class> mClassList = new ArrayList<Class>(Arrays.asList(
            WorkOvertimeApplyActivity.class,
            BusinessTripApplyActivity.class,
            ActivityGoRegister.class,
            Activity_LeaveForTime.class,
            CheckOnActivity.class,
            LifeEatOutListActivity.class,
            TemporaryVisitCustomer.class,
            AddActivity.class,
            AddActivity.class,
            AddActivity.class,
            CustomersContactsActivity.class,
            AirConditioningControlActivity.class,
            LightingControlActivity.class,
            FilesInputActivity.class,
            CastScreenActivity.class,
            CallForHelpActivity.class,
            PhoneReflectActivity.class,
            VoteActivity.class,
            OrderOneMeetingActivity.class,
            MeetingProcessActivity.class,
            QRCodeActivity.class,
            AddActivity.class,
            AddActivity.class)
    );

    public List<IndexFuncationListBean> addAllFuncation() {
        List<IndexFuncationListBean> mlist = new ArrayList<>();
        int len = icn.length;
        for (int i = 0; i < len; i++) {
            mlist.add(new IndexFuncationListBean(icn[i], text[i], mClassList.get(i), i));
            if (i == len - 1) {
                mlist.get(i).setIsShow(true);
            }
        }
        return mlist;
    }
}
